import java.util.Scanner;

/**
 * @author: gao
 * @create-date: 2025/3/28 18:11
 */

public class Solution {
    public int getSum(int a, int b) {
        while (b != 0) {
            int x = a ^ b;//先算出无进位相加的结果
            int carry = (a & b) << 1;//计算进位
            a = x;
            b = carry;
        }
        return a;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int a = in.nextInt(), b = in.nextInt();
            Solution solution = new Solution();
            System.out.println(solution.getSum(a, b));
        }
    }
}